import { FormKeys } from '@/components/ProForm/interface';
import { ProTableInstance } from '@/components/ProTable/interface';
import { TableColumnCtx } from 'element-plus';
/**
 * @description: 枚举类型
 */
export interface PublicType {
  colorType: 'success' | 'info' | 'warning' | 'danger' | 'primary' | 'error' | 'default';
  /**权限类型 */
  permissionType: 'button' | 'search' | 'menu' | 'public' | 'menu_public';
}

// 未知的对象
export interface UnknownObjProps {
  [key: string]: any;
}
export interface ProTableValue {
  value?: ProTableInstance | undefined;
}

/** 树结构 */
export type TreeDataProp<T> = {
  children?: TreeDataProp<T>[];
} & {
  [key in FormKeys<T>]?: any;
};

export interface SpanMethodProps<T = any, R = any> {
  row: R;
  column: TableColumnCtx<T>;
  rowIndex: number;
  columnIndex: number;
}
